import { _decorator, Component, Node } from 'cc';
import { ITreeController } from '../../controller/scene/ITreeController';
import { World2 } from '../../World2';
import { IClick } from '../IClick';
const { ccclass, property } = _decorator;

@ccclass('ITreeClick')
export class ITreeClick extends IClick {

    @property({type:ITreeController,displayName:"控制器"})
    iTree:ITreeController;

    event(data){
        console.log("点击了树",this.iTree);
        World2.getIns().showSceneButton([{
            title:"砍树",
            func:() => {
                this.iTree.rServerEvent("hewedTree");
                World2.getIns().hideSceneButton();
            }
        }])
    }

}

